<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>推广端-订单列表</title>
    <!-- Bootstrap Core CSS -->
    <link href="__PUBLIC__/home/css/bootstrap.min.css" rel="stylesheet">
    <link href="__PUBLIC__/home/css/common.css" rel="stylesheet">

    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

    <link href="__PUBLIC__/home/css/common.css" rel="stylesheet">
</head>

<body>
<div class="container-fluid">
    <!-- Page Heading -->
    <form class="form-inline" action="{:U('Order/index')}" method="post" id="form1">
        <div class="form-group">
            <label for="exampleInputName2">关键字</label>
            <input type="text" class="form-control" id="exampleInputName2" placeholder="订单号/商品名称/商户名称/用户名/归属店铺" name="keyword" style="width: 350px;" value="{$keyword}">
        </div>
        <div class="form-group">
            <label for="exampleInputName2">开始时间</label>
            <input type="text" name="start_time" id="test16" class="form-control" placeholder="点击选择开始时间" style="width: 180px;" readonly value="{$start_time}">
        </div>
        <div class="form-group">
            <label for="exampleInputName2">结束时间</label>
            <input type="text" name="end_time" id="test17" class="form-control" placeholder="点击选择结束时间" style="width: 180px;" readonly value="{$end_time}">
        </div>
        <input type="submit" class="btn btn-info" value="搜索" onclick="return index()"/>
        <a href="{:U('Order/index')}" class="btn btn-warning">清空</a>
        <input type="submit" class="btn btn-success" value="导出excel" onclick="return excel()"/>
    </form>
    <!-- /.row -->

    <div class="row">
        <div class="col-lg-12">
            <h2></h2>
            <div class="">
                <table class="table table-bordered table-hover table-striped" id="dataTables-date">
                    <thead>
                    <tr>
                        <th>用户名</th>
                        <th>订单号</th>
                        <th>商家名称</th>
                        <th>商品名称</th>
                        <th>商品单价</th>
                        <th>商品税费</th>
                        <th>规格</th>
                        <th>折扣价</th>
                        <th>订单折扣价</th>
                        <th>合计金额</th>
                        <th>订单状态</th>
                        <th>下单时间</th>
                        <th>归属店铺</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                        <volist name="order" id ="ord">
                            <tr>
                                <td>{$ord.buyer_name}</td>
                                <td>{$ord.order_sn}</td>
                                <td>{$ord.seller_name}</td>
                                <td>{$ord.goods_name}</td>
                                <td>{$ord.price}</td>
                                <td>{$ord.tax_price}</td>
                                <td>{$ord.specification}</td>
                                <td>{$ord.discount}</td>
                                <td>{$ord.order_amount}</td>
                                <td>{$ord.goods_amount}</td>
                                <td>{$ord.status|get_orderStatus}</td>
                                <td>{$ord.add_time|date="Y-m-d H:i",###}</td>
                                <td>{$ord.s_name}</td>
                                <td>
                                    <a class="btn btn-success" href="{:U('Order/excel',array('order_id'=>$ord['order_id']))}"/>导出Excel</a>
                                </td>
                            </tr>
                        </volist>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    <!-- /.row -->
    <div class="pages">
        {$page}
    </div>
</div>
<script src="__PUBLIC__/home/js/jquery.min.js"></script>
<script src="__PUBLIC__/home/js/bootstrap.min.js"></script>
<script src="__PUBLIC__/home/js/layer/layer.js"></script>
<script src="__PUBLIC__/home/js/laydate/laydate.js"></script>
<!-- iframe自适应高度 -->

</body>
<script type="text/javascript">
    laydate.render({
        elem: '#test16'
        ,type: 'datetime'
    });
    laydate.render({
        elem: '#test17'
        ,type: 'datetime'
    });
    $(".btn-close").click(function () {
        window.parent.$('.bg-model').hide();
    })

    function index(){
        $("#form1").attr('action',"{:U('Order/index')}");
        return true;
    }
    function excel(){
        $("#form1").attr('action',"{:U('Order/excel')}");
        return true;
    }
</script>

</html>
